﻿
namespace Test
{
    using System;
    using NUnit.Framework;
    using PErsonMimi;

    [TestFixture]
    class tests
    {
        [Test, TestCaseSource("objcases")]
        public void Serialize(Object p,string expected)
        {
            string actual = "";// = Ser.Serialize(p);
            Assert.AreEqual(expected, actual);
          
        }
        static object[] objcases =
        {
            new object[] {new Contact(){Value="TestValue",ContactType="TestType"},"<class="+'"'+"Contact"+'"'+"><type>TestType</type><value>TestValue</value></class>"},            
            new object[] {new Address(){City="TestCity",Country="TestCountry",Street="TestStreet"},"<class="+'"'+"Address"+'"'+"><street>TestStreet</street><country>TestCountry</country><city>TestCity</city></class>"},
            new object[] {new Person(1),"<class="+'"'+"Person"+'"'+"><id>1</id><curContacts></curContacts><cuAddress></cuAddress></class>"}
        };
    }
}
